AutoFsck V3.1 - designed for Ubuntu (and derivations) - 27th November 2007
by Jonathan Musther - jmusther@gmail.com
Released Under the GNU General Public License version 3

Thanks very much to Marius for packaging for Ubuntu.

This script will automate the process of regular disk checking in a way
which is user friendly and non-intrusive.

----------Requirements----------
GDM or KDM (Gnome or KDE Display Manager), or some other way of calling the script.
beep
gksu

----------Installation----------
Hopefully you installed AutoFsck from a package for you system, such as a .deb
However this section is included for completeness and information.

It's really very simple, AutoFsck is called (by GDM or KDM; as root) when the user logs
out, this is achieved by inserting:
/usr/sbin/autofsck
into the file /etc/gdm/PostSession/Default or /etc/kde3/kdm/Xreset.  
If you wish to us AutoFsck without using GDM or KDM, you'll need
to find a way call the script as root when the user logs out or 
shuts down.

----------Using Autofsck----------
Every time you log out, the necessity of disk checking is evaluated, and if required
you are prompted.  If you agree to the check, it is done via a quick reboot or on shutdown,
and then the system is then halted.  If you do not agree, the system is prevented from 
automatically checking the disks on next boot (in order not to inconvenience you).

To configure AutoFsck, either find the menu entry "Periodic Disk Checking" in the system
or administration menu of your system, or press Alt+F2 and run:
autofsck --menu

----------How does it work?-------
AutoFsck uses tune2fs to get information about your filesystems, this information is
the 'Mount Count' and 'Maximum Mount Count'.  
If fsck needs to be run, and you agree, AutoFsck creates /forcefsck and reboots the system.
Upon reboot the filesystems are checked and the machine is then halted (thanks to a script
which was placed in the rc system by AutoFsck.  Alternatively, AutoFsck can run checks
on shutdown, in this case it creates a script and places it with the rc0 scripts such
that it will be run on shutdown, just before system halt.  The newly created rc script
will check your filesystems, remove itself, and allow the shutdown process to continue.

----------Contact----------
If you wish to contact me, Jonathan Musther, please email me at:
jmusther@gmail.com

I hope you find AutoFsck useful.
